package org.aurora.model.entity;

import java.io.Serializable;
import java.util.Date;

public class ScheduleTaskContext implements Serializable {

    public ScheduleTaskContext() {
    }

    public ScheduleTaskContext(Task task, ScheduleTask scheduleTask) {
        this.taskName = task.getName();
        this.appcode = task.getAppcode();
        this.uniqueId = scheduleTask.getUniqueId();
        this.expectedSchedulerTime = scheduleTask.getExpectedSchedulerTime();
        this.actualSchedulerTime = scheduleTask.getActualSchedulerTime();
        this.taskState = task.getState();
    }

    /**
     * 任务名
     */
    private String taskName;

    /**
     * 任务状态
     */
    private int taskState;

    /**
     * appcode
     */
    private String appcode;

    /**
     * 调度任务唯一标识
     */
    private String uniqueId;

    /**
     * 预期调度时间
     */
    private Date expectedSchedulerTime;

    /**
     * 实际调度时间
     */
    private Date actualSchedulerTime;

    /**
     * 调度参数
     */
    private String scheduleParam;

    // todo 分片信息


    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public int getTaskState() {
        return taskState;
    }

    public void setTaskState(int taskState) {
        this.taskState = taskState;
    }

    public String getAppcode() {
        return appcode;
    }

    public void setAppcode(String appcode) {
        this.appcode = appcode;
    }

    public String getUniqueId() {
        return uniqueId;
    }

    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    public Date getExpectedSchedulerTime() {
        return expectedSchedulerTime;
    }

    public void setExpectedSchedulerTime(Date expectedSchedulerTime) {
        this.expectedSchedulerTime = expectedSchedulerTime;
    }

    public Date getActualSchedulerTime() {
        return actualSchedulerTime;
    }

    public void setActualSchedulerTime(Date actualSchedulerTime) {
        this.actualSchedulerTime = actualSchedulerTime;
    }

    public String getScheduleParam() {
        return scheduleParam;
    }

    public void setScheduleParam(String scheduleParam) {
        this.scheduleParam = scheduleParam;
    }
}
